package com.yuju.rpt.dao.impl;

import com.yuju.common.core.dao.AbstractBaseDao;
import com.yuju.persist.base.mapper.BaseMapper;
import com.yuju.rpt.dao.ICheckinRoomTypeDao;
import com.yuju.rpt.dao.entity.CheckinRoomType;
import com.yuju.rpt.dao.mapper.CheckinRoomTypeMapper;
import com.yuju.rpt.model.CheckinRoomTypeModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * 类名：CheckinRoomTypeDaoImpl  <br />
 *
 * 功能：
 *
 * @author : jiangp <br />
 * @Date : 2018年1月30日 下午3:20:30  <br />
 * @version : 1.1 <br />
 */
@Repository
public class CheckinRoomTypeDaoImpl extends AbstractBaseDao<CheckinRoomTypeModel, CheckinRoomType, String> implements ICheckinRoomTypeDao {
    @Autowired
    private CheckinRoomTypeMapper checkinRoomTypeMapper;

    @Override
    public BaseMapper<CheckinRoomType, String> getMapper() {
        // TODO Auto-generated method stub
        return checkinRoomTypeMapper;
    }

    @Override
    public List<CheckinRoomTypeModel> getCheckinStatByRoomType(CheckinRoomTypeModel checkinRoomTypeModel){
        return convertP2M(checkinRoomTypeMapper.getCheckinStatByRoomType(getBeanMap(checkinRoomTypeModel)));
    }

	@Override
	public CheckinRoomTypeModel getCheckinStatByRoomTypeSum(CheckinRoomTypeModel checkinRoomTypeModel) {
		return convertP2M(checkinRoomTypeMapper.getCheckinStatByRoomTypeSum(getBeanMap(checkinRoomTypeModel)));
	}
}
